package top.soulblack.purchasesale.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface WechatGeneralAccessMapper {
    List<Map<String,Object>> selectList(@Param(value="table")String table,
                                        @Param(value="columns")List<String>columns,
                                        @Param(value="condiction")List<String>condiction,
                                        @Param(value="order")List<String>order);
    Map<String,Object>selectByPrimaryKey(@Param(value="table")String table,@Param(value="index")String index,Integer id,@Param(value="columns")List<String>columns);

    int updateByPrimaryKey(@Param(value="table")String table,
                           @Param(value = "index")String index,
                           Integer id,
                           @Param(value="columns")List<String>columns,
                           @Param(value="data")Map<String,Object>data);

    int insert(@Param(value="table")String table, @Param(value="data")Map<String,Object>data);
}
